package com.zd.file.brower.controller;

import com.zd.file.brower.service.ReloadPathService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/config")
public class ConfigController {
    static Logger logger = LoggerFactory.getLogger(ConfigController.class);
    @Autowired
    ReloadPathService reloadPathService;
    @GetMapping("/reload")
    public String list(String currentPath){
        logger.info("显示目标目录{}",currentPath);
        reloadPathService.reload();
        return "success2";
    }
}
